<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
    <script>
      //原写法
      function add(a, b){
        b = b || 1
        return a + b;
      }
      //新写法
      function add2(a, b = 1){
        return a + b;
      }
      
      console.log(add2(20))
    </script>
	</body>
</html>
